home *** CD-ROM | disk | FTP | other *** search
- GDB @ Patchlevel 18
-
- - many of you had difficulty with finding gdb @Patchlevel 16
- to patch to PL 17 with the last set of diffs. I apologize for
- this. gdb@pl 17 is now available on atari.archive.umich.edu
- for you to apply the 17->18 diffs.
-
- - many small bug fixes.
-
- - gdb -L is not working reliably. i still have'nt tracked this down.
- But other than that gdb is doing quite well.
-
- GDB @ Patchlevel 17
- - gdb -L (logging) now always works independent of TOS etc.
-
- GDB @ Patchlevel 16
- - andreas sent a more reliable way to intut -mshort.
-
- - gdb will not bomb out when it tries to access some unitialized
- vars in the child. thanks again to andreas.
-
- - gdb will sometimes bomb out when you have a syntax error in
- the gdb command that you enter. i will fix this at a future
- time. the fixes are easy but tedious. in the mean while
- avoid syntax errors in gdb commands :-)
-
- - also planned for the next version a more tos version independent
- way of logging.
-
- - some of you have asked about screen flipping
- and logging the debugees (the program being debugged) output. i
- personaly dont plan to do this, but you should feel free to
- put in those features.
-
- - note: gdb-atartST still cannot handle g++'s output.
-
- GDB @ Patchlevel 15
-
- ================NOTE NOTE NOTE NOTE============================
-
- TOS 1.4 or better required unless you
- recompile the source with -DOLDTOS
-
- ================NOTE NOTE NOTE NOTE============================
-
- *************************************************
- Please get rid of gdb Patchlevel 14 or older
- *************************************************
-
- yet another significant update to gdb-atariST. please take
- a few moments to read over gdb.texinfo too (ie: dont expect
- to find all the answers in this README file :-).
-
- - gdb now has a new option to log a gdb session. gdb -L will
- log the session in the file gdb.log (append if the file already
- exists). Use this option WITH EXTREME CAUTION. This only works
- with TOS 1.4. I have a later version of TOS and it does not
- work correctly with it, and it goes and adds stuff to random
- files. I dont know if -L will work with the TOS in STe's or TT's.
- you have been adequately warned.!!
-
- - gdb will NOT try to intut when it is trying to debug a -mshort
- compiled program. The user must specify the "-mshort" option to
- gdb.ttp if you are going to try and debug a -mshort compiled
- application. the heauristic we were using earlier to intut -mshort
- did not work very well, and caused many problems. So the sequence
- for a typical -mshort compile/debug becomes:
-
- gcc -mshort -c -g foo.c bar.c
- gcc -mshort -o foo foo.o bar.o
- sym-ld -o foo.sym e:\lib\crt0.o foo.o bar.o -lgnu16
- gdb -mshort -e foo -s foo.sym
-
- - gdb wont get confused when -mshort is used, and the arguements
- to a function are displayed (on a breakpoint, backtrace etc).
- the arguements were always being passed correctly, but were not
- being displayed correcty.
-
- - gdb wont get confused by certain typedefs.
-
- - Frames fixed. up/down etc should work.
-
- - will not allow you to re-run inferior (even if the
- inferior has exited). this is not possible to do under TOS.
-
- - NEEDS tos 1.4 or better and uses Pexec mode 6 to launch
- inferior.
-
- - many people are confused about this: to pass command line
- arguements to the program to be debugged you have to either
- set-args args ...
- BEFORE you issue the initial run command
- or you can specify the args in the initial run command
- run args ...
- the run args... form is more convenient.
-
- - got rid of the initialization hacks, now all the init
- functions are called from init.c (which in turn in called
- from main). now we can compile gdb with -O etc.
-
- - other code reorgs and hacks.
-
- - much thanks to Michal Jaegermann who provided lots of
- suggestions examples and suffered thru many intermmediate
- versions.
-
- GDB @ Patchlevel 14
-
- *************************************************
- Please get rid of gdb Patchlevel 12 or older
- *************************************************
-
- here is a major update to gdb. i have fix lots of stuff, and
- put together a preliminary doc (which is almost accrate).
-
- - massive overhauling of most parts of the code. literally
- dozens of bug fixes. i feel it is beta quality code now.
- it is very usable.
-
- - gcc -mshort compiled objects should work pretty much
- now. gdb tries to intut when its reading in the object
- if it was -mshort compiled. a new command "gcc-mshort"
- is available in gdb that will communicate the fact to
- gdb in case it can fails to figure it out.
-
- - new additions: "until" and "disassemble" commands. see
- gdb.texinfo for details.
-
- - things to take note of:
-
- - if you include <osbind.h> or <linea.h>, then compile
- your program with -D__NO_INLINE__. gdb cannot handle inlined
- asm code gracefully, as it is not expecting exceptional conditions
- at the point. So if you try to (s)tep or (n)ext over an
- asm inlined piece of code, gdb will be confused. Note that
- as long as you are not going to (s)tep or (n)ext over them, inlined
- asm segments are fine, and will not confuse gdb. Also note that
- inlined C code is just fine. (so you dont need __NO_INLINE__
- for <stdio.h> etc).
-
- - calling a C function from a gdb command (like in the command
- "print foo(x)") is not reliable. The printed value is always
- incorrect (always 0). The arguements are not pushed reliably
- when you are debugging a -mshort object (in some situations
- they are, in some they are not). Sometimes (most times!) gdb will
- get totally confused after return from a function called from a
- gdb command expression. so avoid doing this right now. i am
- working on this.
-
- please send feedback.
-
- ++jrb @Patchlevel 14 9/21/91
-
- -----------------------------------------------------------------------------`
-
- *************************************************
- Please get rid of gdb Patchlevel 10 or older
- *************************************************
-
- Major problems fixed after previous distribution (Patchlevel 8):
-
- - doing a next over a library function call no longer confuses
- gdb.
-
- - gdb does'nt do strange things when the debugee exits. doing
- a run without any bkpt's set now will not freeze up
- (some) machines.
-
- - gdb now relocates everything it needs to.
-
- Known problems in Patchlevel 12:
-
- - it still gets confused about the current frame and/or the up frame
- once in while (but not so often, its very usable now).
-
- - if you try to do gdb commands before you do the initial run
- it will complain (or in some circumstances even successfully do
- the command), but later it will be very confused and act strangely.
- the solution of course is to ALWAYS do run first, and then issue
- command (the only command that you should do before the inital
- run, is set-args if needed)
-
- - it does not work so hot with -mshort compiled binaries. for
- debugging purposes dont use -mshort for now. actually, i dont
- see why this is a concern at all!
-
- - it still need symld -- no big deal of course.
-
- here is the real README:
-
- Here is a heavily hacked gdb for atariST, based on the incredible work
- of John Dunning of porting it to the ST.
-
- The big difference is that this version supports dbx_format symbols and
- stabs, not the gnu format (ie: "gcc -g" and not "gcc -gg"). gnu has
- essentially dropped support for the -gg format. Other than that, it is
- still undergoing development, to make it as stable, and to bring it up
- to the changes in the latest rev of gdb from FSF. It is quite usable,
- and a lot of you have been waiting for "something" so i am sending it
- out for you to play with. I will provide updates (hopefully in a timely
- fashion :-).
-
- PREREQUISITES:
- before you can use this version of GDB you have to ensure that you have:
-
- - gcc V1.39 (.0 or better)
- - gas V1.38 (i think 1.36 will work, but i never tested it)
- - library Patchlevel 66
- (only needed if you want o recompile gdb)
- - include files V66
- (i do not guarantee anything with any older version of the
- include files, you must assure that you have a <stdio.h>
- in which getc() is a macro and not an inline function when
- !__NO_INLINE__. It will work correctly, but it will not
- break in the function containing the getc/getchar, even though
- it will successfully set the breakpoint.)
- - gcc-ld.ttp and sym-ld.ttp from utils Patchlevel 17 or better.
- Any older versions of these is guaranteed NOT to work.
- - ATLEAST the following patches to dbxout.c and toplevel.c in
- the gcc-tos source. these patches assume that you have already applied
- patches for the atari-tos version of gcc 1.39 (to toplev.c, dbxout
- did'nt have any diffs from the fsf ditsribution).
- There are other patches (includeing these two) in ../../gcc/diffs
- so you might as well apply them while you are at it.
-
- *** /home/bammi/etc/src/gcc-1.39/dbxout.c Wed Oct 17 00:16:31 1990
- --- dbxout.c Sun May 12 12:59:05 1991
- ***************
- *** 83,89 ****
- #define FORCE_TEXT
- #endif
-
- ! #ifdef USG
- #include "stab.h" /* If doing DBX on sysV, use our own stab.h. */
- #else
- #include <stab.h> /* On BSD, use the system's stab.h. */
- --- 83,89 ----
- #define FORCE_TEXT
- #endif
-
- ! #if defined(USG) || defined(CROSSATARI) || defined(atarist) || defined(atariminix)
- #include "stab.h" /* If doing DBX on sysV, use our own stab.h. */
- #else
- #include <stab.h> /* On BSD, use the system's stab.h. */
- ***************
- *** 186,194 ****
- --- 186,200 ----
- bzero (typevec, typevec_len * sizeof typevec[0]);
-
- /* Used to put `Ltext:' before the reference, but that loses on sun 4. */
- + #ifndef atarist
- fprintf (asmfile,
- "\t.stabs \"%s\",%d,0,0,Ltext\nLtext:\n",
- input_file_name, N_SO);
- + #else
- + fprintf (asmfile, "\t.stabs \"");
- + atari_output_filename(asmfile, input_file_name);
- + fprintf(asmfile, "\",%d,0,0,Ltext\nLtext:\n", N_SO);
- + #endif
-
- next_type_number = 1;
- next_block_number = 2;
- *** ../gcc-diff-1.39/toplev.c Sun Jan 20 16:29:28 1991
- --- toplev.c Sun May 12 14:06:26 1991
- ***************
- *** 2110,2112 ****
- --- 2110,2126 ----
-
- fprintf (stderr, "\n");
- }
- +
- + #ifdef atarist
- + void atari_output_filename(file, filename)
- + FILE *file;
- + char *filename;
- + {
- + if( (!file) || (!filename) ) return;
- + for(; *filename; filename++)
- + {
- + if(*filename == '\\') putc('\\', file);
- + putc(*filename, file);
- + }
- + }
- + #endif
- --------------------------------------cut-------------------------------
-
- HOW TO USE IT:
- to debug a program called foo, consisting of foo.c and bar.c do
-
- gcc -g -c foo.c bar.c (-O optional)
- gcc -o foo foo.o bar.o (get normal TOS executable)
- sym-ld -o foo.sym e:\lib\crt0.o foo.o bar.o -lgnu (make symbol file)
- (use the appro. full path to your crt0.o
- note: sym-ld -r is not required and -l works).
-
- gdb -e foo -s foo.sym (fire up gdb with exec-file == foo and
- symbol-file == foo.sym)
- (gdb) r [any-args to foo] (before doing anything, you have to run,
- and it will break immediately with a
- non-sensical message)
- NOTE VERY CAREFULLY: no other gdb commands before you issue
- the run command. this is the most common
- mistake. if you want to pass args to foo
- specify them with the run command. The
- arguements may not exceed 126 characters
- and they may not contain re-directions.
-
- (gdb) b main (now start issuing normal gdb commands)
- ...
- (gdb) c finally a continue to actually start the prog
- .... and so on
- (gdb) q
-
-
- - use the online help
- - when debugging a large program, if gdb appears to be confused about
- line numbers, especially when you set a breakpoint, and it sets
- it on a non-sensical line number or a line-number where you
- did'nt expect it to set it at, you have run out of stack (alloca)
- space in gdb. You will have to tailor _initial_stack in atarist.c to
- your environment. i ship with 128K. in my setup i use 512K, and it
- is quite comfortable with good sized programs.
-
- - this version should work fine with the TT other 020 based accel. it
- has'nt been extensively tested in that environment.
- - It works with MiNT and/or MiNT/mgr. Dont try to link with mntlib though.
- A MiNT specific version is in the works. Oh, it may get confused by
- SIGTSTP (^Z), and other kills with inappropriate signal numbers.
- see ./signal.h. the mapping of signals to values is not the same as
- in MiNT and/or normal gcc-tos lib.
-
- COMPILING:
- - adjust _initial_stack for you environment in atarist.c
- - it is VERY VERY important to specify "-I." when compiling ANY module
- of gdb. Some of the .h files in the src directory, MUST be included
- from here, rather than the gcc-include directory. (we are faking out
- everything to do with signals).
- - do NOT try to link with mntlib.
-
- BUGS:
- - please send me reports along with Patchlevels of gdb/include/util
- i will most probably not entertain any bugs with
- util < 17
- lib < 66
- include < 66
-
- enjoy,
- --
- bang: uunet!cadence!bammi jwahar r. bammi
- domain: bammi@cadence.com
- GEnie: J.Bammi
- CIS: 71515,155
-